package com.buss.admin.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

/**   
 * @Title: Entity
 * @Description: 后台
 * @author zhangdaihao
 * @date 2016-04-09 10:06:01
 * @version V1.0   
 *
 */
@Entity
@Table(name = "hx_user_role", catalog = "hxclub")
@SuppressWarnings("serial")
public class UserRoleEntity implements java.io.Serializable {

	private String id;
	private AdminEntity user;
	private AuthRoleEntity role;
	
	@Id
	// @GeneratedValue(generator = "paymentableGenerator")
	// @GenericGenerator(name = "paymentableGenerator", strategy = "uuid")
	@Column(name ="ID",nullable=false,length=32)
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	@ManyToOne(fetch = FetchType.LAZY) //　　ManyToOne关联到GoodsEntity
    @JoinColumn(name="USER_ID")
	public AdminEntity getUser() {
		return user;
	}
	public void setUser(AdminEntity user) {
		this.user = user;
	}
	@ManyToOne(fetch = FetchType.LAZY) //　　ManyToOne关联到GoodsEntity
    @JoinColumn(name="ROLE_ID")
	public AuthRoleEntity getRole() {
		return role;
	}
	public void setRole(AuthRoleEntity role) {
		this.role = role;
	}
}
